package com.ruoyi.project.modules.parameter.service;

import java.util.List;

import com.ruoyi.project.modules.interfaceinfo.request.BffParamReq;
import com.ruoyi.project.modules.interfaceinfo.request.ListInterfaceFieldParamReq;
import com.ruoyi.project.modules.interfaceinfo.request.VirtualUsageParamReq;
import com.ruoyi.project.modules.interfaceinfo.vo.InterfaceParam;
import com.ruoyi.project.modules.parameter.domain.InterfaceParamsFieldRelation;
import com.ruoyi.project.modules.parameter.domain.ParamTree;
import com.ruoyi.project.modules.table.domain.FieldInfo;
import com.ruoyi.project.modules.table.domain.FieldStatus;
import com.ruoyi.project.modules.table.domain.TableInfo;

/**
 * 接口下数据集及字段Service接口
 * 
 * @author smallrain
 * @date 2021-10-30
 */
public interface IInterfaceParamsFieldRelationService 
{
    /**
     * 查询接口下数据集及字段
     * 
     * @param id 接口下数据集及字段主键
     * @return 接口下数据集及字段
     */
    public InterfaceParamsFieldRelation selectInterfaceParamsFieldRelationById(Long id);

    /**
     * 查询接口下数据集及字段列表
     * 
     * @param interfaceParamsFieldRelation 接口下数据集及字段
     * @return 接口下数据集及字段集合
     */
    public List<InterfaceParamsFieldRelation> selectInterfaceParamsFieldRelationList(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    /**
     * 新增接口下数据集及字段
     * 
     * @param interfaceParamsFieldRelation 接口下数据集及字段
     * @return 结果
     */
    public int insertInterfaceParamsFieldRelation(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    /**
     * 修改接口下数据集及字段
     * 
     * @param interfaceParamsFieldRelation 接口下数据集及字段
     * @return 结果
     */
    public int updateInterfaceParamsFieldRelation(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    /**
     * 批量删除接口下数据集及字段
     * 
     * @param ids 需要删除的接口下数据集及字段主键集合
     * @return 结果
     */
    public int deleteInterfaceParamsFieldRelationByIds(String ids);

    /**
     * 删除接口下数据集及字段信息
     * 
     * @param id 接口下数据集及字段主键
     * @return 结果
     */
    public int deleteInterfaceParamsFieldRelationById(Long id);

    List<ParamTree> listFieldParam(String interfaceType, Long interfaceId, String paramType);

    List<ParamTree> listParams(String interfaceType, Long interfaceId, String paramType);

    List<FieldInfo> selectFieldList(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    List<FieldInfo> selectParamsList(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    List<FieldInfo> selectParamsFieldList(Long dataRelationId);

    List<FieldInfo> selectDubboFieldList(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    List<FieldInfo> selectDubboParamsList(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    List<FieldStatus> selectFieldStatusList(Long id);

    List<FieldStatus> selectFieldStatusListByParamsFieldId(Long id);

    List<InterfaceParamsFieldRelation> selectInterfaceParamsFieldRelationByVUids(List<Long> vuIds);

    List<TableInfo> tableList(Long interfaceId, String type, Long isInParam);

    int saveVirtualUsageParam(VirtualUsageParamReq virtualUsageParamReq);

    List<InterfaceParam> listInterfaceALlField(ListInterfaceFieldParamReq listInterfaceFieldParamReq);

    void saveBffParam(BffParamReq bffParamReq, List<Long> interfaceParamsFieldRelationIds, List<Long> paramsFieldRelationIds);

    void saveDubboParam(BffParamReq bffParamReq, List<Long> interfaceParamsFieldRelationIds, List<Long> paramsFieldRelationIds);

    void removeField(InterfaceParamsFieldRelation interfaceParamsFieldRelation);

    List<InterfaceParamsFieldRelation> selectInterfaceParamsFieldRelationByDataRelationId(List<Long> id, String dataRelationType);

    void updateFieldDesign(InterfaceParamsFieldRelation fieldRelation);

    void saveGroupParam(BffParamReq bffParamReq, List<Long> interfaceParamsFieldRelationIds, List<Long> paramsFieldRelationIds);
}
